package com.gp.ssmplus.base.core.mybatis.autoconfigure;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * description: MybatisPlusConfig
 * date: 2019/12/29 17:32
 * version: 1.0
 * @author Administrator
 */

@Configuration
@MapperScan("com.gp.ssmplus.business.mapper")//这个注解，作用相当于下面的@Bean MapperScannerConfigurer，2者配置1份即可
public class MybatisPlusConfig {

    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

}
